﻿/*-----------------------------------------------------------------------------!
! Address entity class                                                         !
!------------------------------------------------------------------------------!
! System   : Inventory Management System                                       !
! Client   : UK based                                                          !
! Date     : April 2011                                                        !
! Copyright: (C) KAWISOFT Inc                                                  !
! Program  : Address.cs                                                        !
! Function : All field of address table                                        !
!------------------------------------------------------------------------------!
! Notes:                                                                       !
! Original author: Shaiful Islam                                               !
! Last changed by: Shaiful Islam, May 2 2011                                   !
===============================================================================*/


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model.Upadan {

    public class Address
    {
        private string _Id;
        private string _Description;
        private string _PostCode;
        private string _Country;
        private string _Telephone;
        private string _Mobile;
        private string _Fax;
        private string _Email;
        private string _Web;
        private string _PersonId;
        private string _Live;

        public Address() { }

        // address id
        public string Id
        {
            get { return _Id; }
            set 
            { 
                _Id = value;
                _Id = (_Id.Length > 20) ? _Id.Substring(0, 20) : _Id;
            }
        }

        // address Description
        public string Description
        {
            get { return _Description; }
            set 
            { 
                _Description = value;
                _Description = (_Description.Length > 200) ? _Description.Substring(0, 200) : _Description;
            }
        }

        // address PostCode
        public string PostCode
        {
            get { return _PostCode; }
            set 
            { 
                _PostCode = value;
                _PostCode = (_PostCode.Length > 50) ? _PostCode.Substring(0, 50) : _PostCode;
            }
        }

        // address Country
        public string Country
        {
            get { return _Country; }
            set 
            { 
                _Country = value;
                _Country = (_Country.Length > 50) ? _Country.Substring(0, 50) : _Country;
            }
        }

        // address Telephone
        public string Telephone
        {
            get { return _Telephone; }
            set 
            { 
                _Telephone = value;
                _Telephone = (_Telephone.Length > 20) ? _Telephone.Substring(0, 20) : _Telephone;
            }
        }

        // address Mobile
        public string Mobile
        {
            get { return _Mobile; }
            set 
            { 
                _Mobile = value;
                _Mobile = (_Mobile.Length > 20) ? _Mobile.Substring(0, 20) : _Mobile;
            }
        }

        // address Fax
        public string Fax
        {
            get { return _Fax; }
            set 
            { 
                _Fax = value;
                _Fax = (_Fax.Length > 20) ? _Fax.Substring(0, 20) : _Fax;
            }
        }


        // address Email
        public string Email
        {
            get { return _Email; }
            set 
            { 
                _Email = value;
                _Email = (_Email.Length > 20) ? _Email.Substring(0, 20) : _Email;
            }
        }

        // address Web
        public string Web
        {
            get { return _Web; }
            set 
            { 
                _Web = value;
                _Web = (_Web.Length > 20) ? _Web.Substring(0, 20) : _Web;
            }
        }

        // address PersonId
        public string PersonId
        {
            get { return _PersonId; }
            set 
            { 
                _PersonId = value;
                _PersonId = (_PersonId.Length > 20) ? _PersonId.Substring(0, 20) : _PersonId;
            }
        }

        // address Live
        public string Live
        {
            get { return _Live; }
            set 
            { 
                _Live = value;
                _Live = (_Live.Length > 1) ? _Live.Substring(0, 1) : _Live;
            }
        }


    }
}
